// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import '@/mock'
import Vue from 'vue'
import App from './App'
// import { getCache, setCache } from './data/data'
import router from './router'
import beforeSet from './router/beforeSet'
import store from './store'
import '@/less/app.less'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import icon from '@/component/global/icon'
import tableTmp from '@/component/global/tableTmp'
import wrap from '@/component/global/wrap'

Vue.use(ElementUI)

Vue.config.productionTip = false

Vue.config.errorHandler = (err, vm, info) => {
    console.warn(info)
    console.error(err)
}

// Vue.prototype.$getCache = getCache
// Vue.prototype.$setCache = setCache

// 标记非生产模式
Vue.prototype.$isDevMode = process.env.NODE_ENV === 'development'

Vue.component('icon', icon)
Vue.component('tableTmp', tableTmp)
Vue.component('wrap', wrap)

beforeSet()
/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>'
})
